<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title>安平县居民核酸检测信息系统</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/main.css" rel="stylesheet" />
		<script src="layui/layui.js" charset="utf-8"></script>
		<style>
			body{background-color: #F2F2F7; margin: 0; display: none;}
			.content{
				margin: 0 15px;
			}
			.content h2{text-align: center;font-size: 20px; line-height: 50px; border-bottom: 1px solid #979797;}
			.box1{
				display: flex;
				flex-direction: column;
				margin: 16px 0;
			}
			.box1 .li1{
				display: flex;
				justify-content: space-between;
				align-items: center;
			}
			.box1 .li1 span{
				font-size: 16px;
			}
			.box2{
				position: relative;
				background-color: #fff;
				height: 300px;
			}
			.box2 .items{
				display: flex;
				height: 38x;
				line-height: 38px;
				justify-content: space-between;
				align-items: center;
				/* margin: 0 15px; */
				border-bottom: 1px solid #979797;
			}
			.box2 .items span{
				font-size: 13px;
			}
			.result{
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin: 8px 12px;
			}
			.result span{
				font-size: 12px;
			}
			.txt{position: absolute; bottom: 0;}
			.txt p{font-size: 12px; margin: 6px 12px; color: #666666;}
			.box3{
				margin: 12px 15px;
				display: flex;
				justify-content: space-between;
				padding-bottom: 12px;
				border-bottom: 1px solid #979797;
			}
			.box3 span{
				font-size: 12px;
			}
			.alt{
				font-size: 12px;
				margin: 0 15px;
			}
		</style>
	</head>
		
	<body id="result_body">
		<div class="content">
			<h2 id="hospital"></h2>
			<div class="box1">
				<div class="li1" style="margin-bottom: 12px;">
					<span id="name"></span>
					<span id="age"></span>
					<span id="sex"></span>
				</div>
				<div class="li1">
					<span>样本类型：咽拭子</span>
					<span>送检科室：检验科</span>
				</div>
			</div>
		</div>
		<div class="box2">
			<div class="items">
				<span style="margin-left: 15px;">项目名称</span>
				<span>项目简称</span>
				<span>结果</span>
				<span>参考范围</span>
				<span style="margin-right: 15px;">方法学</span>
			</div>
			<div class="result">
				<span>新型冠状<br>病毒检测</span>
				<span>2019-nCoV</span>
				<span id="result"></span>
				<span>阴性</span>
				<span>pcr荧光针法</span>
			</div>
			<div class="txt">
				<p>解释与建议：</p>
				<p>1、未检出：所有靶标均为阴性</p>	
				<p>2、检出：同一份样本所有靶标为阳性，或两种类型样本单靶标均为阳性</p>
				<p>3、本检测可能受到采样时机、采样部位以及方法学局限性等因素的影响，结果需结合临床进行分析</p>
				<p>4、建议疑似者至少隔日重新采集样本，再次检测，并结合血清学特异性IgM/IgG抗体检测进一步诊断</p>
				<p>检测靶点：2019-nCoV 0RF1ab基因、N基因</p>
			</div>
		</div>
		<div class="box3">
			<span id="tester"></span>
			<span id="date"></span>
		</div>
		<div class="alt">注：本报告单仅对标本负责</div>
		<div class="footer">
			<p>安平县新冠肺炎疫情防控工作指挥部</p>
			<p>技术支持:智慧安平</p>
		</div>
		<script>
		layui.use(['layer', 'jquery'], function(){
		  var layer = layui.layer
		  ,$ = layui.jquery;
			//0 安平县人民医院 1安平县中医院 2安平县疾控中心 3安平县第二人民医院 4安平康融医院
			$(document).ready(function(){
              	//获取url带过来的参数,如下代码是获取url问号后面的字符串
                var query = window.location.search;
                //因为参数中包括有中文，会变成乱码，需转码
                query = decodeURI(query);
              	//alert(query);
                //获取参数objData
              	var objData = query.split('=')[1];
              	//alert(objData[1]);
                //再将JSON字符串转为js对象即可
                objData = JSON.parse(objData);
              	
                $('#hospital').html(objData.org+'核酸检测报告单');
                $('#name').html('姓名：'+objData.name);
                $('#age').html('年龄：'+objData.age);
                $('#sex').html('性别：'+objData.sex);
                if(objData.version == 2){
                    $('#result').html('阴性');
                    $('#result').addClass('s3');					
                }
                if(objData.version == 3){
                    $('#result').html('需复查/阳性');
                    $('#result').addClass('s2');
                }

                $('#tester').html('检测人：'+objData.testUser);
                $('#date').html('检测时间：'+objData.testDate);
              	$('#result_body').show();
			});
		});
		function getQueryVariable(variable)
		{
		    var query = window.location.search.substring(1);
		    var vars = query.split("&");
		    for (var i=0;i<vars.length;i++) {
		            var pair = vars[i].split("=");
		            if(pair[0] == variable){return pair[1];}
		    }
		    return(false);   
		}
		</script>
	</body>

</html>
